package ttu.idu0080.orderService_client;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 * <p>
 * Java class for order complex type.
 * 
 * <p>
 * The following schema fragment specifies the expected content contained within
 * this class.
 * 
 * <pre>
 * &lt;complexType name="order">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="customer" type="{http://server.order.idu0080.ttu/}customer" minOccurs="0"/>
 *         &lt;element name="order_id" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         &lt;element name="order_products" type="{http://server.order.idu0080.ttu/}orderProduct" maxOccurs="unbounded" minOccurs="0"/>
 *         &lt;element name="price_total" type="{http://www.w3.org/2001/XMLSchema}float"/>
 *         &lt;element name="seller" type="{http://server.order.idu0080.ttu/}seller" minOccurs="0"/>
 *         &lt;element name="shipping_address" type="{http://server.order.idu0080.ttu/}address" minOccurs="0"/>
 *       &lt;/sequence>
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "order", propOrder = { "customer", "orderId", "orderProducts",
		"priceTotal", "seller", "shippingAddress" })
public class Order {

	protected Customer customer;
	@XmlElement(name = "order_id")
	protected int orderId;
	@XmlElement(name = "order_products", nillable = true)
	protected List<OrderProduct> orderProducts;
	@XmlElement(name = "price_total")
	protected float priceTotal;
	protected Seller seller;
	@XmlElement(name = "shipping_address")
	protected Address shippingAddress;

	/**
	 * Gets the value of the customer property.
	 * 
	 * @return possible object is {@link Customer }
	 * 
	 */
	public Customer getCustomer() {
		return customer;
	}

	/**
	 * Sets the value of the customer property.
	 * 
	 * @param value
	 *            allowed object is {@link Customer }
	 * 
	 */
	public void setCustomer(Customer value) {
		this.customer = value;
	}

	/**
	 * Gets the value of the orderId property.
	 * 
	 */
	public int getOrderId() {
		return orderId;
	}

	/**
	 * Sets the value of the orderId property.
	 * 
	 */
	public void setOrderId(int value) {
		this.orderId = value;
	}

	/**
	 * Gets the value of the orderProducts property.
	 * 
	 * <p>
	 * This accessor method returns a reference to the live list, not a
	 * snapshot. Therefore any modification you make to the returned list will
	 * be present inside the JAXB object. This is why there is not a
	 * <CODE>set</CODE> method for the orderProducts property.
	 * 
	 * <p>
	 * For example, to add a new item, do as follows:
	 * 
	 * <pre>
	 * getOrderProducts().add(newItem);
	 * </pre>
	 * 
	 * 
	 * <p>
	 * Objects of the following type(s) are allowed in the list
	 * {@link OrderProduct }
	 * 
	 * 
	 */
	public List<OrderProduct> getOrderProducts() {
		if (orderProducts == null) {
			orderProducts = new ArrayList<OrderProduct>();
		}
		return this.orderProducts;
	}

	/**
	 * Gets the value of the priceTotal property.
	 * 
	 */
	public float getPriceTotal() {
		return priceTotal;
	}

	/**
	 * Sets the value of the priceTotal property.
	 * 
	 */
	public void setPriceTotal(float value) {
		this.priceTotal = value;
	}

	/**
	 * Gets the value of the seller property.
	 * 
	 * @return possible object is {@link Seller }
	 * 
	 */
	public Seller getSeller() {
		return seller;
	}

	/**
	 * Sets the value of the seller property.
	 * 
	 * @param value
	 *            allowed object is {@link Seller }
	 * 
	 */
	public void setSeller(Seller value) {
		this.seller = value;
	}

	/**
	 * Gets the value of the shippingAddress property.
	 * 
	 * @return possible object is {@link Address }
	 * 
	 */
	public Address getShippingAddress() {
		return shippingAddress;
	}

	/**
	 * Sets the value of the shippingAddress property.
	 * 
	 * @param value
	 *            allowed object is {@link Address }
	 * 
	 */
	public void setShippingAddress(Address value) {
		this.shippingAddress = value;
	}

}
